<template>
    <div>
      <a-checkbox-group
        v-model="value"
        name="checkboxgroup"
        :options="plainOptions"
        @change="onChange"
      />
      <hr />
      <a-checkbox-group :options="plainOptions" :default-value="['百度']" @change="onChange" />
      <hr />
      <a-checkbox-group :options="options" :value="['Pear']" @change="onChange" />
      <hr />
    </div>
  </template>
  <script>
  const plainOptions = ['腾讯', '阿里巴巴', '百度','字节跳动'];
  const options = [
    { label: '苹果', value: 'Apple' },
    { label: '梨', value: 'Pear' },
    { label: '橘子', value: 'Orange' },
  ];
  const optionsWithDisabled = [
    { value: 'Apple' },
    { label: 'Pear', value: 'Pear' },
    { label: 'Orange', value: 'Orange', disabled: false },
  ];
  export default {
    data() {
      return {
        plainOptions,
        options,
        optionsWithDisabled,
        value: [],
      };
    },
    methods: {
      onChange(checkedValues) {
        console.log('checked = ', checkedValues);
        console.log('value = ', this.value);
      },
    },
  };
  </script>
  